project(wildwood)
 
cmake_minimum_required(VERSION 2.8)

include_directories ("${PROJECT_SOURCE_DIR}/tinyhttp")

#add_subdirectory (tinyhttp)

# find wxWidgets
set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config-3.0")
find_package(wxWidgets REQUIRED aui xml net core base)
include( "${wxWidgets_USE_FILE}" )

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")

add_executable(
    ${PROJECT_NAME}
    app.cpp
    mainwnd.cpp
    mapwnd.cpp
    preferencesdlg.cpp
    geoutils.cpp
    gpx.cpp
    gpxdb.cpp
    sqlite3.c
    tileprovider.cpp
    )

add_executable(
    clitest 
    clitest.cpp
    sqlite3.c
    geoutils.cpp
    gpxdb.cpp
    tileprovider.cpp
    httplib.cpp
    tinyhttp/http.c
    tinyhttp/header.c
    tinyhttp/chunk.c
    )
 
target_link_libraries(
    ${PROJECT_NAME}
    ${wxWidgets_LIBRARIES}
    dl
    )

target_link_libraries(
    clitest
    dl
    ${wxWidgets_LIBRARIES}
    )
